<template>
  <div>
    <el-table :data="tableData" :border="border" style="width: 100%">
      <el-table-column
        v-for="(item, index) in colunm"
        :key="index"
        :prop="item.prop"
        :label="item.label"
        :width="item.width"
      >
        <template v-if="item.isSlot" slot-scope="scope">
          <div>
            <slot :name="item.prop" :row="scope.row"></slot>
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
export default {
  props: {
    tableData: {
      type: Array,
      default () {
        return []
      }
    },
    colunm: [], //表头数据
    border: {
      type: Boolean,
      default: false
    }
  }
}
</script>
<style lang="less" scoped></style>
